
#ifndef FASTAPPLICATION_H
#define FASTAPPLICATION_H

#include <Communication\Assembler_fwd.h>
#include <Codecs\TemplateRegistry_fwd.h>
#include <Codecs\HeaderAnalyzer_fwd.h>
#include <Messages\ValueMessageBuilder_fwd.h>

#include <Codecs/NoHeaderAnalyzer.h>
#include <Codecs/FastEncodedHeaderAnalyzer.h>

#include <string>

    class FASTApplication
    {
    public:
      FASTApplication();
      ~FASTApplication();

      /// @brief parse command line arguments, and initialize.
      /// @param argc from main
      /// @param argv from main
      /// @returns true if everything is ok.
      virtual bool init(int argc, char * argv[]);

      /// @brief run the program
      /// @returns a value to be used as an exit code of the program (0 means all is well)
      virtual int run() = 0;

      /// @brief do final cleanup after a run.
      virtual void fini();
	
	  QuickFAST::Codecs::TemplateRegistryPtr GetRegistry() const { return pRegistry_; }
	  const std::string& GetIP() const { return ip_; }
	  const std::string& GetPort() const { return port_; }
	  const std::string& GetMode() const { return mode_; }

    private:
	  QuickFAST::Codecs::TemplateRegistryPtr pRegistry_;
	  std::string ip_;
	  std::string port_;
	  std::string mode_;
    };

#endif // FASTAPPLICATION_H